package com.ruoyi.common.oss;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * OSS配置参数（从application.properties读取）
 */
@Component
@ConfigurationProperties(prefix = "aliyun.oss")
public class OSSProperties {
    private String endpoint;      // 地域节点
    private String accessKeyId;   // AccessKey ID
    private String accessKeySecret; // AccessKey Secret
    private String bucketName;    // Bucket名称
    private String basePath;      // 基础路径（如"upload/"，可选，用于统一前缀）

    // Getter和Setter
    public String getEndpoint() { return endpoint; }
    public void setEndpoint(String endpoint) { this.endpoint = endpoint; }
    public String getAccessKeyId() { return accessKeyId; }
    public void setAccessKeyId(String accessKeyId) { this.accessKeyId = accessKeyId; }
    public String getAccessKeySecret() { return accessKeySecret; }
    public void setAccessKeySecret(String accessKeySecret) { this.accessKeySecret = accessKeySecret; }
    public String getBucketName() { return bucketName; }
    public void setBucketName(String bucketName) { this.bucketName = bucketName; }
    public String getBasePath() { return basePath; }
    public void setBasePath(String basePath) { this.basePath = basePath; }
}
